import { Module } from '@nestjs/common';
import { DemoService } from './demo.service';
import { DemoController } from './demo.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Demo } from './entities/demo.entity';
import { DemoCategory } from './entities/demo-category.entity';
import { DemoConsumer } from './demo.consumer';
import { BullModule } from '@nestjs/bullmq';
import { QueueName } from 'src/common/constants/queue.constant';

@Module({
  imports: [
    TypeOrmModule.forFeature([Demo, DemoCategory]),
    BullModule.registerQueue({ name: QueueName.DEMO }),
  ],
  controllers: [DemoController],
  providers: [DemoService, DemoConsumer],
})
export class DemoModule {}
